#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "Server.h"

int main (int argc, char *argv[])
{   
    if(argc < 3)
    {
        printf("./a.out port path\n");
        return -1;
    }        
    uint16_t port = (uint16_t)atoi(argv[1]);
    chdir(argv[2]);
    //初始化用于监听的套接字
    int32_t lfd = initListenFd(port);

    //启动服务器程序
    epollRun(lfd);

    return 0;
}